<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>
<body>
<script src="../js/vue.js"></script>
<div id="app">
  <h2 class="['active','line'">{{message}}</h2>
  <h2 :class="['active','line']">{{message}}</h2>
  <h2 :class="[active,line]">{{message}}</h2>
  <h2 :class="getClass()">{{message}}</h2>
<!-- 这是错误的，不是函数调用-->
  <h2 :class="getClass">{{message}}</h2>
</div>
<script>
    const app = new Vue({
        el:'#app',
        data:{
            message:'hello vue',
            active:'aaaaa',
            line:'bbbbbb'
        },
        methods:{
          getClass:function (){
            return [this.active,this.line]
          }
        }

    })
</script>

</body>
</html>